{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "c3f1f0d5",
   "metadata": {},
   "outputs": [],
   "source": [
    "adict = {'Name': 'Runoob', 'Age': 7, 'Class': 'First'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "72ee2bb4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Age', 'Class', 'Name']"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sorted(adict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d57ca32f",
   "metadata": {},
   "outputs": [],
   "source": [
    "bdict={}\n",
    "for i in sorted(adict):\n",
    "    bdict[i]=adict[i]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "6c3c2efd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Age': 7, 'Class': 'First', 'Name': 'Runoob'}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bdict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0518aef0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
